import request from '@/request'


// 订单列表
export const apiOrderList = data => request.post('/v1/order/proxyOrderQueryPage', data)

// 售后订单列表
export const apiSalesOrderList = data => request.post('/v1/order/afterSalesOrderQueryPage', data)

// 订单详情

export const apiOrderDetails = data => request.post('/v1/order/queryOrderById', data)

// 更新订单信息
export const apiUpdateOrder = data => request.post('/v1/order/updateOrder', data)

// 查询下单信息 错的
export const apiSubOrderData = data => request.post('/v1/order/queryOrderById', data)

// 查询订单的支付信息
export const apiOrderBalance = data => request.post('/v1/cart/cartBuyInfo', data)

// 购物车下单
export const apiCartOrder = data => request.post('/v1/cart/cartOrder', data)

// 商品下单
export const apiGoodsToOrder = data => request.post('/v1/product/orderDirectly', data)


// 支付
export const apiOrderToPay = data => request.post('/v1/order/balancePayment', data)

// 取消待支付订单
export const apiCancelOrder = data => request.post('/v1/order/cancelOrder', data)

// 申请退款
export const apiApplyRefund = data => request.post('/v1/order/applyRefund', data)


// 签收
export const apiOrderSign = params => request.post('/v1/order/confirmReceive', {}, {
  params
})


// 申请售后
export const apiOrderAfter = data => request.post('/v1/order/applyAfterSales', data)


// 取消售后申请
export const apiCancelRefund = data => request.post('/v1/order/cancelApplyAfterSales', data)

// 获取物流详情
export const findLogistics = data => request.post('/v1/express/findLogistics', data)
// 获取微信openId
export const apiGetOpenId = data => request.post('/v1/weChat/findUserOpenId', data)

// 获取微信支付参数
export const apiWeixinPayment = data => request.post('/v1/weChat/jsApiPay', data)

// 获取订单支付方式	
export const apiGetPayMethods = data => request.post('/v1/cart/findPayMethodList', data)

// 检查商品状态
export const checkProductSku = data => request.post('/v1/product/checkProductSku', data)

// 判断包不包邮（运费）
export const checkPinkage = data => request.post('/v1/freightSettings/judgeMailNotPackage', data)